#pragma once

#include "stdafx.h"
#include "StreamReceiver.h"
#include "GlobalMemoryInstance.h"

class CStreamSource
{
public:
	CStreamSource(void);
	~CStreamSource(void);

public:
	int m_int_stream_id;
	int	m_int_stream_input_type;	// web-cam, ip camera, screen capture, video source, etc

	INPUT_DEVICE*		m_ptr_input_device;		// input device info structure
	CStreamReceiver*	m_ptr_stream_receiver;	// stream receiver object
	CFrameBuffer*		m_ptr_frame_buffer;		// frame buffer object

public:
	virtual void StartStreamReceiver();
	virtual void StopStreamReceiver();

	void SetRelationship(CFrameBuffer* ptr_frame_buffer);

protected:
	HANDLE m_hdl_stream_receiver;
	CRITICAL_SECTION m_cs_lockThread;

public:
	BOOL m_bln_isStreamReceiving;
};
